<template>
  <van-picker
    class="a9-picker"
    v-bind="$attrs"
    v-on="$listeners"
    :title="title"
    :confirm-button-text="confirmButtonText"
    :cancel-button-text="cancelButtonText"
    :show-toolbar="showToolbar">

    <slot></slot>

    <template #title>
      <slot name="title"></slot>
    </template>

    <template #columns-top>
      <slot name="columns-top"></slot>
    </template>

    <template #columns-bottom>
      <slot name="columns-bottom"></slot>
    </template>

  </van-picker>
</template>

<script>
export default {
  name: 'a9-picker',
  inheritAttrs: false,
  props: {
    title: {
      type: String,
      default: ''
    },
    confirmButtonText: {
      type: String,
      default: '确认'
    },
    cancelButtonText: {
      type: String,
      default: '取消'
    },
    showToolbar: {
      type: Boolean,
      default: true
    }
  }
}
</script>
